package com.jlcindia;

public class OOPTest37 {

	public static void main(String[] args) {
		Inter1 in=null;
		//in=new Inter1(); can't create the object of abstract class
		System.out.println(Inter1.xy);// because of static and final
	//  Inter1.xy=90; final can't be assigned(it is a constant)
		System.out.println(Inter1.Abc.val);// because inner class Abc is static and val is static
	//	Inter1.Abc.search(); search method is non static method so not accessible
		Inter1.Abc ref=null;
		ref=new Inter1.Abc();
		ref.search();
		Inter1 ref1=new Pqr1();
		ref1.display();
		ref1.execute();
		

	}
}
interface Inter1{
	//int data; it is public,static and final by default && we know final must be 
	int xy=123;  // initialized(it is a constant)in same statement as in this statement
	public static final int msg=1234;
	//private boolean valid=false; can't be private
	//Inter1(){} constructor can't be defined because of no instance variable
	//{}    IIB can't be defined because of no instance member can be defined
	//static{}  because static final variable already initialized
	//void process(){} // we can't implement the method because interface is by default abstract
	void execute();//it is by default public & abstract
	public abstract void display();
	//static void show(); only public and abstract are allowed
	//final void add();   only public and abstract are allowed
	class Abc{  // it is by default public and static
		static int val=6767;
		void search(){
			System.out.println("search in abc class");
		}
	}
}
//	class Mno implements Inter1{} because we are not implementing the method or stating the class as abstract
	abstract class Xyz implements Inter1{ //need to make abstract because only one method is implemented yet
		public void display(){
			System.out.println("\n display in Xyz");
		}
		
	}
	class Pqr1 extends Xyz implements Inter1{ //need not to make class as abstract because we are 
		public void execute(){               //implementing the method by overriding and overriding 
			System.out.println("\n execute in Pqr");//the other method of interface by extending 
		}											//Xyz class
	}

